import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.12

ApplicationWindow {
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")

    Action {
        id: actionNew
        text: "&New"
        shortcut: StandardKey.New
        onTriggered: {
            area.placeholderText="To do -New";
        }
    }
    Action {
        id: actionSave
        text: "&Save"
        shortcut: StandardKey.Save
        onTriggered: {
            area.placeholderText="To do -Save";
        }
    }

    Action {
        id: actionOpen
        text: "&Open"
        shortcut: StandardKey.Open
        onTriggered: {
            area.placeholderText="To do -Open";
        }
    }


    menuBar: MenuBar{
        Menu {
            title: "Files"
            MenuItem {action: actionNew}
            MenuItem {action: actionOpen}
            MenuItem {action: actionSave}
        }
    }

    header: ToolBar {
        RowLayout {
            ToolButton {action: actionNew}
            ToolButton {action: actionOpen}
            ToolButton {action: actionSave}
        }
    }

    TextArea {
        id: area
        anchors.fill: parent
    }
}
